<#--分页1-->
<#macro pagetool url>
<style type="text/css">
#page_ul {
	list-style-type: none;
	text-align: center;
}
#page_ul li {
	border: 1px solid #9FC;
	list-style-position: inside;
	display:inline-block;
	background-color:#cccccc;
}
#page_ul li a{
	text-decoration:none; 
	width:45px;
	display:inline-block;
}
#page_ul li:hover {
	background-color: #9F0;
}
</style>
<div id="pagetoolbar" style="width:90%;">
	<ul id="page_ul">
		<li><a href="${url}/${pager.pagesize}/${pager.homePage}.htm" target="_self">首页</a></li>
		<li><a href="<#if pager.hasPre>${url}/${pager.pagesize}/${pager.prePage}.htm<#else>#</#if>" target="_self">上一页</a></li>
		<#list pager.pageNumberList as p>
			<li <#if p == pager.pageno>style="background-color: #9F0;"</#if> ><a href="${url}/${pager.pagesize}/${p}.htm" target="_self">${p}</a></li>
		</#list>
		<li><a href="<#if pager.hasNext>${url}/${pager.pagesize}/${pager.nextPage}.htm<#else>#</#if>" target="_self">下一页</a></li>
		<li><a href="${url}/${pager.pagesize}/${pager.endPage}.htm" target="_self">尾页</a></li>
		<li style="width:70px;">页码<span style="color:yellow;">${pager.pageno}/${pager.pagecount}</span></li> 
	</ul>
</div>
</#macro>
<#macro pagetoolv2 formid>
<style type="text/css">
#page_ul {
	list-style-type: none;
	text-align: center;
}
#page_ul li {
	border: 1px solid #9FC;
	list-style-position: inside;
	display:inline-block;
	background-color:#cccccc;
}
#page_ul li a{
	text-decoration:none; 
	width:45px;
	display:inline-block;
}
#page_ul li:hover {
	background-color: #9F0;
}
</style>
<div id="pagetoolbar" style="width:90%;">
	<ul id="page_ul">
		<li><a href="javascript: executepage(${pager.pagesize},${pager.homePage});" target="_self">首页</a></li>
		<li><a href="<#if pager.hasPre>javascript: executepage(${pager.pagesize},${pager.prePage});<#else>#</#if>" target="_self">上一页</a></li>
		<#list pager.pageNumberList as p>
			<li <#if p == pager.pageno>style="background-color: #9F0;"</#if> ><a href="javascript: executepage(${pager.pagesize},${p});" target="_self">${p}</a></li>
		</#list>
		<li><a href="<#if pager.hasNext>javascript: executepage(${pager.pagesize},${pager.nextPage});<#else>#</#if>" target="_self">下一页</a></li>
		<li><a href="javascript: executepage(${pager.pagesize},${pager.pagecount});" target="_self">尾页</a></li>
		<li style="width:70px;">页码<span style="color:yellow;">${pager.pageno}/${pager.pagecount}</span></li> 
	</ul>
</div>
<script>
function executepage(pagesize,pageno){
	setPagesize(pagesize);
	setPageno(pageno);
	window.parent.document.getElementById("${formid}").submit();
}
function setPagesize(pagesize){
window.parent.document.getElementById("pagesize").value = pagesize;
}
function setPageno(pageno){
window.parent.document.getElementById("pageno").value = pageno;
}
</script>
</#macro>

<#-- 导入javascript 文件-->
<#macro script srcs>
	<#list srcs  as s>
		<script type="text/javascript" src="${basepath}/${s}"></script>
	</#list>
</#macro>

<#-- 页面权限 -->
<#macro power code>
	<#if SESSION_CURRENT_USER.isadmin>
		<#nested>
	<#else>
		<#if code!="ADMIN">
			<#list session_powercodes as sessionpowercode>
				<#if sessionpowercode==code>
					<#nested>
					<#break>
				</#if>
			</#list>
		</#if>
	</#if>
</#macro>

<#--订单-->
<#macro order field>
	
</#macro>
<#--订单产品-->
<#macro product field>
	<#if order.product??>
		${((("order.product."+field)?eval)?trim)!""}
	</#if>
</#macro>
<#--订单客户-->
<#macro guestinfo field>
	<#if order.guestinfo??>
		${((("order.guestinfo."+field)?eval)?trim)!""}
	</#if>
</#macro>

